<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>

<input type="text" id="inputId" value="zhangsan">
<input type="button" value="点我" onclick="clickMe()">

<script>
  function clickMe() {
    //内置对象：已经new好对象，名字也起好了，直接用
    var inputObj = document.getElementById('inputId')
    console.log(inputObj.value);
  }
</script>

</body>
</html>